<template>
	<gui-page ref="guiPage" :customHeader="true">
		<template v-slot:gHeader>
			<nav-bar-custom left-icon="left" :title="$t('distributedEnter.historicalRecord')"></nav-bar-custom>
		</template>
		<template v-slot:gBody>
			<view v-if="data.barcodeList.length == 0" class="noticeHooks">
				{{ data.barcodeList.length == 0 ? $t('stockManage.notAvailable') : $t('stockManage.without') }}
			</view>
			<view class="record-card" v-for="(item, index) in data.barcodeList" :key="`${item.barcode}` + `${index}`"
				v-else>
				<view class="card-mini-head">
					<view class="title-line"></view>
					<text>{{ $t('translationImage.serialNumber') }}：{{  index+1 }}</text>
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('fgReturn.department') }}：</text>{{ item.departmentI18  }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('equipmentRepair.processArea') }}：</text>{{ item.processAreaI18 }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('equipmentRepair.machineNumber') }}：</text>{{ item.machineNoI18 }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('equipmentRepair.faultType') }}：</text>{{ item.faultTypeI18 }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('equipmentRepair.equipmentName') }}：</text>{{ item.faultDeviceI18 }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('equipmentRepair.severityLevel') }}：</text>{{ item.faultLevelI18 }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('multilingual.state') }}：</text>{{item.statusI18 }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('months.FaultDescription') }}：</text>{{item.faultDesc }}
				</view>
			</view>
		</template>
	</gui-page>
</template>

<script setup>
import { navigate } from '@/utils/routerSkip.js';
import { useStore } from "vuex";
import { basPdaOperationLogFn } from '@/utils/index.js';
import { OPERATION_DEL, OPERATION_LOOK } from '@/constant/index.js'
import {ref,reactive,onMounted,watch,computed,toRaw} from 'vue';
import { OPERATION_COMMIT, OPERATION_CHOOSE,USERNAME } from '@/constant/index.js'
import { orderByReporterld } from '@/api/api.js'

let data = reactive({
	barcodeList: [],//条码数组
})

onMounted(() => {
	orderByReporterld({
		reporterId: uni.getStorageSync(USERNAME), //uni.getStorageSync(USERNAME)
		pageSize:20,
		pageNum:1
	}).then(res => { 
		if(res.status==200){
			data.barcodeList = res.data.list
		}
	})
})

</script>

<style></style>
s